﻿namespace KinonekoSoftware.CodariaDB.Documents.Index
{
    public sealed class OccupationReference : RootObject
    {
        private string _color;
        private string _name;
        private int    _amount;
        private string _suffix;
        private double _percent;

        public override string ToString()
        {
            return $"{Name},{Percent:P3}";
        }

        public string DocumentID { get; set; }

        [BsonIgnore]
        [JsonIgnore]
        public double Percent
        {
            get => _percent;
            set => SetValue(ref _percent, value);
        }

        public string Suffix
        {
            get => _suffix;
            set => SetValue(ref _suffix, value);
        }

        public int Amount
        {
            get => _amount;
            set => SetValue(ref _amount, value);
        }

        public string Name
        {
            get => _name;
            set => SetValue(ref _name, value);
        }

        public string Color
        {
            get => _color;
            set => SetValue(ref _color, value);
        }
    }
}